
import Layout from '@/layout'
export const asyncRoutes = [
  {
    path: '/manage-base-info',
    component: Layout,
    redirect: '/manage-base-info',
    name: 'manage-base-info',
    meta: { title: '基础信息管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'warehouse',
        name: 'warehouse',
        component: () => import('@/views/manage-base-info/warehouse'),
        meta: { title: '仓库管理', icon: '' }
        // children: [{
        //   hidden: true,
        //   path: 'null',
        //   name: 'null',
        //   component: () => import('@/views/manage-base-info/warehouse/null')
        //   // meta: { title: '库区管122理', icon: '' }

        // }]
      },
      { // 新增路由
        hidden: true,
        path: 'null',
        name: 'null',
        component: () => import('@/views/manage-base-info/null')

      },
      {
        path: 'area',
        name: 'area',
        component: () => import('@/views/manage-base-info/area'),
        meta: { title: '库区管理', icon: '' }

      },
      {
        path: 'location',
        name: 'location',
        component: () => import('@/views/manage-base-info/location'),
        meta: { title: '库位管理', icon: '' }
      },
      {
        path: 'location-view',
        name: 'location-view',
        component: () => import('@/views/manage-base-info/location-view'),
        meta: { title: '库位视图', icon: '' }
      },
      {
        path: 'goods',
        name: 'goods',
        component: () => import('@/views/manage-base-info/goods'),
        meta: { title: '货品管理', icon: '' }
      },
      {
        path: 'goods-type',
        name: 'goods-type',
        component: () => import('@/views/manage-base-info/goods-type'),
        meta: { title: '货品类型管理', icon: '' }
      }
    ]
  },

  {
    path: '/manage-business',
    component: Layout,
    redirect: '/manage-business',
    name: 'manage-business',
    meta: { title: '商务管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'goods-owner',
        name: 'goods-owner',
        component: () => import('@/views/manage-business/goods-owner'),
        meta: { title: '货主管理', icon: '' }
      },
      {
        path: 'task-picking',
        name: 'task-picking',
        component: () => import('@/views/manage-business/task-picking'),
        meta: { title: '承运商管理', icon: '' }
      }
    ]
  },
  {
    path: '/manage-storage',
    component: Layout,
    redirect: '/manage-storage',
    name: 'manage-storage',
    meta: { title: '库内管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'list',
        name: 'Knlist',
        component: () => import('@/views/manage-storage/list'),
        meta: { title: '盘点单', icon: '' }
      },
      {
        path: 'list-task',
        name: 'list-task',
        component: () => import('@/views/manage-storage/list-task'),
        meta: { title: '盘点任务', icon: '' }
      },
      {
        path: 'storage-lose-profit',
        name: 'storage-lose-profit',
        component: () => import('@/views/manage-storage/storage-lose-profit'),
        meta: { title: '库存损耗', icon: '' }
      },
      {
        path: 'latest-storage',
        name: 'latest-storage',
        component: () => import('@/views/manage-storage/latest-storage'),
        meta: { title: '实时库存', icon: '' }
      }
    ]
  },

  {
    path: '/manage-storage-in/list-in',
    component: Layout,
    redirect: '/manage-storage-in/list-in',
    name: 'manage-storage-in/list-in',
    meta: { title: '入库管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'list',
        name: 'list',
        component: () => import('@/views/manage-storage-in/list-in/list'),
        meta: { title: '入单库', icon: '' }
      },
      {
        path: 'task-receive',
        name: 'task-receive',
        component: () => import('@/views/manage-storage-in/list-in/task-receive'),
        meta: { title: '收货任务', icon: '' }
      },
      {
        path: 'list-in/task-add',
        name: 'list-in/task-add',
        component: () => import('@/views/manage-storage-in/list-in/task-add'),
        meta: { title: '上架任务', icon: '' }
      }
    ]
  },

  {
    path: '/manage-storage-out',
    component: Layout,
    redirect: '/manage-storage-out',
    name: 'manage-storage-out',
    meta: { title: '出库管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'list-out',
        name: 'list-out',
        component: () => import('@/views/manage-storage-out/list-out'),
        meta: { title: '出库单', icon: '' }
      },
      {
        path: 'task-picking',
        name: 'Cktask-picking',
        component: () => import('@/views/manage-storage-out/task-picking'),
        meta: { title: '拣货任务', icon: '' }
      },
      {
        path: 'manage-task-transfer',
        name: 'manage-task-transfer',
        component: () => import('@/views/manage-storage-out/manage-task-transfer'),
        meta: { title: '交接任务', icon: '' }
      }
    ]
  },
  {
    path: '/nested',
    component: Layout,
    redirect: '/nested/menu1',
    name: 'Nested',
    meta: {
      title: 'Nested',
      icon: 'nested'
    },
    children: [
      {
        path: 'menu1',
        component: () => import('@/views/nested/menu1/index'), // Parent router-view
        name: 'Menu1',
        meta: { title: 'Menu1' },
        children: [
          {
            path: 'menu1-1',
            component: () => import('@/views/nested/menu1/menu1-1'),
            name: 'Menu1-1',
            meta: { title: 'Menu1-1' }
          },
          {
            path: 'menu1-2',
            component: () => import('@/views/nested/menu1/menu1-2'),
            name: 'Menu1-2',
            meta: { title: 'Menu1-2' },
            children: [
              {
                path: 'menu1-2-1',
                component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
                name: 'Menu1-2-1',
                meta: { title: 'Menu1-2-1' }
              },
              {
                path: 'menu1-2-2',
                component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
                name: 'Menu1-2-2',
                meta: { title: 'Menu1-2-2' }
              }
            ]
          },
          {
            path: 'menu1-3',
            component: () => import('@/views/nested/menu1/menu1-3'),
            name: 'Menu1-3',
            meta: { title: 'Menu1-3' }
          }
        ]
      },
      {
        path: 'menu2',
        component: () => import('@/views/nested/menu2/index'),
        name: 'Menu2',
        meta: { title: 'menu2' }
      }
    ]
  },

  {
    path: 'external-link',
    component: Layout,
    children: [
      {
        path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
        meta: { title: 'External Link', icon: 'link' }
      }
    ]
  }
]

